<?php

/* @var $this yii\web\View */
use yii\helpers\Html;
use yii\widgets\ActiveForm;
$this->title = '设置推荐奖拿七代';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="page-title">
  <div>
    <h1><i class="fa fa-trophy"></i> 七代分红奖励</h1>
    <p style="font-style:normal;">会员分红奖拿下面七代，只要推荐了相应下面一至七代会员，产生分红就拿（我推荐的会员每次分红所得金额X以下七代中对应代数分红奖励比例值，所得数目放入相应推荐人的个人账户中），只要产生分红，这个就计算就相应产生</p>
  </div>
  <!--div style="width:300px;">
    <ul class="breadcrumb">
      <li><i class="fa fa-home fa-lg"></i></li>
      <li><a href="#">推荐奖</a></li>
    </ul>
  </div-->
</div>

<!-- page body start-->
<div class='card'>
<?php $form = ActiveForm::begin(); ?>
      <?php
        if(isset($tip)&&$tip===true){
          if($model->hasErrors()){
      ?>
            <div class="alert alert-danger" role="alert">
              <?php
                  foreach($model->getErrors("") as $key=>$value){
                    echo $value."<br>";
                  }
              ?>
            </div>
      <?php
          }else{
      ?>
            <div class="alert alert-success" role="alert">更新成功！</div>
      <?php
          }
        }
      ?>
      <?= $form->field($model, 'one_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('一代分红奖值比例') ?>
      <?= $form->field($model, 'two_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('二代分红奖值比例') ?>
      <?= $form->field($model, 'three_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('三代分红奖值比例') ?>
      <?= $form->field($model, 'four_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('四代分红奖值比例') ?>
      <?= $form->field($model, 'five_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('五代分红奖值比例') ?>
      <?= $form->field($model, 'six_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('六代分红奖值比例') ?>
      <?= $form->field($model, 'seven_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'0.9{1,4}'])->label('七代分红奖值比例') ?>

  <button type="submit" class="btn btn-warning">提交</button>
<?php ActiveForm::end(); ?>
</div>
<!-- page body end-->
